﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;
using BCEntity.OA.TeamWork.TeamWorkParticipant;

namespace BCData.OA.TeamWork.TeamWorkParticipant
{
    /// <summary>
    /// 协同办公参与者
    /// </summary>
    public interface ITeamWorkParticipantData
    {
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        /// <param name="teamWorkParticipantId">协同办公参与者Id</param>
        Task<bool> Exists(long teamWorkParticipantId);
        /// <summary>
		/// 增加协同办公参与者
		/// </summary>
		/// <param name="entity">协同办公参与者信息</param>
		Task<TeamWorkParticipantEntity> Add(TeamWorkParticipantEntity entity);
        /// <summary>
        /// 增加协同办公参与者
        /// </summary>
        /// <param name="entities">协同办公参与者信息列表</param>
        Task<bool> Add(List<TeamWorkParticipantEntity> entities);
        /// <summary>
        /// 更新协同办公参与者
        /// </summary>
        /// <param name="entity">协同办公参与者信息</param>
        Task<TeamWorkParticipantEntity> Update(TeamWorkParticipantEntity entity);
        /// <summary>
        /// 删除协同办公参与者
        /// </summary>
        /// <param name="teamWorkParticipantId">协同办公参与者Id</param>
        Task<bool> Delete(long teamWorkParticipantId);
        /// <summary>
        /// 删除协同办公参与者
        /// </summary>
        /// <param name="teamWorkId">协同办公Id</param>
        Task<bool> DeleteBatch(long teamWorkId);
        /// <summary>
        /// 获取协同办公参与者
        /// </summary>
        /// <param name="teamWorkParticipantId">协同办公参与者Id</param>
        Task<TeamWorkParticipantEntity> GetEntity(long teamWorkParticipantId);
        /// <summary>
        /// 获取协同办公参与者列表
        /// </summary>
        /// <param name="teamWorkId">协同办公Id</param>
        Task<IEnumerable<TeamWorkParticipantEntity>> GetList(long teamWorkId);
        /// <summary>
        /// 获取协同办公参与者分页列表
        /// </summary>
        /// <param name="teamWorkParticipantName">协同办公参与者名称</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">协同办公参与者每页数据条数</param>
        Task<(IEnumerable<TeamWorkParticipantEntity>, int)> Query(string teamWorkParticipantName, DateTime? start, DateTime? end, int pageIndex, int pageSize);
    }
}
